﻿using System;

namespace Inovout.Models
{
    [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)]
    public class DataPropertyContractAttribute : Attribute
    {
        public DataPropertyContractAttribute(bool isRequired, int maxValue)
            : this(DataType.Text, isRequired, maxValue)
        {
        }
        public DataType DataType { get; private set; }
        public bool IsRequired { get; private set; }
        public object MaxValue { get; private set; }
        public object MinValue { get; private set; }

        public DataPropertyContractAttribute(DataType controlType, bool isRequired, int maxValue)
        {
            DataType = controlType;
            IsRequired = isRequired;
            MaxValue = maxValue;
            MinValue = MinValue;
        }
    }
}
